Skip to content

Correctly wrap/unwrap DebugLocalVariable ArgNumber in OpConstant#3769

Open
AdamBrouwersHarries wants to merge 2 commits into
KhronosGroup:mainfrom
AdamBrouwersHarries:debug-local-variable-argnumber
Open

Correctly wrap/unwrap DebugLocalVariable ArgNumber in OpConstant#3769
AdamBrouwersHarries wants to merge 2 commits into
KhronosGroup:mainfrom
AdamBrouwersHarries:debug-local-variable-argnumber

Conversation

@AdamBrouwersHarries

@AdamBrouwersHarries AdamBrouwersHarries commented Jun 1, 2026

Copy link
Copy Markdown

The NonSemantic.Shader.DebugInfo spec requires that the (optional) ArgNumber operand for a DebugLocalVariable operation is the id of a 32-bit OpConstant.

This patch ensures that both the LLVM to SPIR-V and SPIR-V to LLVM paths through the translator respect this requirement.

@CLAassistant

CLAassistant commented Jun 1, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

The NonSemantic.Shader.DebugInfo spec requires that the (optional) ArgNumber
operand for a DebugLocalVariable operation is the id of a 32-bit OpConstant.

This patch ensures that both the LLVM to SPIR-V and SPIR-V to LLVM paths
through the translator respect this requirement.
@AdamBrouwersHarries AdamBrouwersHarries force-pushed the debug-local-variable-argnumber branch from f13b82f to 4ebd698 Compare June 1, 2026 17:17
@AdamBrouwersHarries AdamBrouwersHarries changed the title Correctly wrap/unwrap DebugLocalVariable ArgNumber in OpConstant (#3768) Correctly wrap/unwrap DebugLocalVariable ArgNumber in OpConstant Jun 1, 2026
@AdamBrouwersHarries

Copy link
Copy Markdown
Author

Note, this addresses #3768

@MrSidims MrSidims requested review from svenvh and vmaksimo June 10, 2026 21:54
@MrSidims

Copy link
Copy Markdown
Contributor

The patch makes sense to me, but I'm slightly surprised, that no test changes are required. If so - it means, that we need a dedicated test for the fix.

Regardless, would be nice to have review from @vmaksimo and @svenvh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants